//
//  ViewController.swift
//  表情键盘
//
//  Created by waterfoxjie on 15/8/9.
//  Copyright © 2015年 zj. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    override func viewDidLoad() {
        
        super.viewDidLoad()
        
        // 设置自定义输入键盘
        textView.inputView = emoticonVC.view
        
    }

    @IBOutlet weak var textView: UITextView!
    
    // 懒加载控件
    private lazy var emoticonVC : EmoticonViewContr = EmoticonViewContr { [weak self] (emoticon) -> () in
        
        self?.textView.insertEmoticon(emoticon)
    }
    
    // 点击事件，用于测试
    @IBAction func btnClick() {
        
        print("最终结果：\(textView.emoticonText)")
        
    }
    
}

